home *** CD-ROM | disk | FTP | other *** search
Wrap
// shared decoding and rendering routines // global objects params=new Array(); userData=new Array(); // -------------------------------------- // registration information // -------------------------------------- regInfo=[]; regInfo[0]={code:31020,name:'FL Studio Producer Edition',registered:false,needed:false}; // FL regInfo[1]={code:31010,name:'FL Studio FruityLoops Edition',registered:false,needed:false}; regInfo[2]={code:31000,name:'FL Studio Express Edition',registered:false,needed:false}; regInfo[3]={code:37030,name:'Fruity Soundfont Player',registered:false,needed:false, isPlug:true}; // Plugins regInfo[4]={code:37020,name:'Fruity DX10',registered:false,needed:false, isPlug:true}; regInfo[5]={code:33300,name:'Wasp',registered:false,needed:false, isPlug:true}; regInfo[6]={code:33110,name:'SimSynth',registered:false,needed:false, isPlug:true}; regInfo[7]={code:33000,name:'Fruity DrumSynth Live',registered:false,needed:false, isPlug:true}; regInfo[8]={code:33400,name:'DreamStation DXi',registered:false,needed:false, isPlug:true}; regInfo[9]={code:22100,name:'SimSynth (standalone)',registered:false,needed:false, isPlug:false}; regInfo[10]={code:22250,name:'EZ-Editor',registered:false,needed:false, isPlug:false}; regInfo[11]={code:22220,name:'BeatSlicer',registered:false,needed:false, isPlug:false}; // {code:37021,name:'DX10 VSTi/DXi',registered:false,needed:false, isPlug:true}; // {code:37310,name:'WASP VSTi/DXi',registered:false,needed:false, isPlug:true}; // {code:37110,name:'SimSynth Live VSTi/DXi',registered:false,needed:false, isPlug:true}; // {code:33400,name:'DreamStation DXi',registered:false,needed:false, isPlug:true}, // object with product text info (matches the index from the previous one) productText=[]; // **** PRODUCER **** <<START>> productText[0]='<div align="center"><img src="img_glob/_fllogo_producer.gif" width="180" height="83"></div>'; productText[0]+='<span class="fl-emph">FL Studio Producer Edition contains: </span>'; productText[0]+='<ul><li class="fl-text">All <span class="fl-emph">Fruityloops Edition</span> features and…</li>'; productText[0]+='<li class="fl-text"> New Mixer Window (64 channels, track rerouting, ASIO track recording, integrated EQ and more).</li>'; productText[0]+='<li class="fl-text"> Audio tracks with waveform preview & support for cue points.</li>'; productText[0]+='<li class="fl-text"> Direct-to-disk recording & offline rendering of mixer tracks. </li>'; productText[0]+='<li class="fl-text"> Integrated Wave Editor.</li>'; productText[0]+='<li class="fl-text"> Life Time Free Updates to this edition.</li>'; // **** PRODUCER **** <<END>> // **** FRUITYLOOPS **** <<START>> productText[1]='<div align="center"><img src="img_glob/_fllogo_fl.gif" width="180" height="83"></div>'; productText[1]+='<span class="fl-emph">FL Studio Fruityloops Edition contains:</span>'; productText[1]+='<ul><li class="fl-text">All <span class="fl-emph">Express Edition</span> features and…</li>'; productText[1]+='<li class="fl-text">Piano roll allowing chords.</li>'; productText[1]+='<li class="fl-text">Full automation of all wheels.</li>'; productText[1]+='<li class="fl-text">ASIO support (allowing 2ms latency!).</li>'; productText[1]+='<li class="fl-text">Internal controllers.</li>'; productText[1]+='<li class="fl-text">Can be used as VSTi client in hosts like Cubase, Sonar, Logic, Orion, ...</li>'; productText[1]+='<li class="fl-text">Life Time Free Updates to this edition.</li>'; // **** FRUITYLOOPS **** <<END>> // **** EXPRESS **** <<START>> productText[2]='<div align="center"><img src="img_glob/_fllogo_express.gif" width="180" height="83"></div>'; productText[2]+='<span class="fl-emph">FL Studio Express Edition contains:</span>'; productText[2]+='<ul><li class="fl-text">External generators.</li>'; productText[2]+='<li class="fl-text">16Bit 44KHz stereo.</li>'; productText[2]+='<li class="fl-text">External midi control</li>'; productText[2]+='<li class="fl-text">Unlimited number of channels</li>'; productText[2]+='<li class="fl-text">4 to 64 notes in a pattern sequencer.</li>'; productText[2]+='<li class="fl-text">Integrated TS-404 bassline.</li>'; productText[2]+='<li class="fl-text">Support for VSTi & DXi.</li>'; productText[2]+='<li class="fl-text">Export to wav, MP3 & MIDI.</li>'; productText[2]+='<li class="fl-text">Playlist.</li>'; productText[2]+='<li class="fl-text">Piano keyboard.</li>'; productText[2]+='<li class="fl-text">Life Time Free Updates to this edition.</li>'; // **** EXPRESS **** <<END>> productText[3]='Fruity Soundfont Player is an FL Studio add-on that gives you the power to load, play and render soundfonts (.sf2 files).'; productText[4]='This DX10 FM synth is an FL Studio add-on that recreates the classic FM sound by using a harmonically rich modulating oscillator. Intuitive interface!'; productText[5]='The WASP is the FL Studio generator version of the WASP, a complex subtractor using 2 oscillators. You get both the Fruity as the VSTi version.'; productText[6]='SimSynth Live is the FL Studio generator version of SimSynth. This is a <b>realtime</b> version of the standalone version of SimSynth that can be run INSIDE FL Studio.'; productText[7]='Gives you the power of Live drums in your FL Studio productions. Tweak your drums until they are just perfect!'; productText[8]='Dreamstation DXi is a versatile DirectX instrument creating "analog synth" quality sounds that works inside all DXi compatible hosts like FL Studio and Sonar.'; productText[9]='SimSynth Standalone is the original version of SimSynth. It has more advanced settings and can produce a wider variety of sounds but can not run in FL Studio. However, FL Studio can use its presets and riffs as regular samples!'; productText[10]='EZ Editor is the ideal companion for all your sample handling. Recording of WAV, set loop points, create custom shapes (formula editor), extract SoundFonts, ... '; productText[11]='BeatSlicer is an application that allows you to "slice" drumbreaks or other loops into its individual parts, rearrange them and use them inside FL Studio.'; // -------------------------------------- // -------------------------------------- // this section contains routines to decode // the parameters // -------------------------------------- function arrBase16_dec() { // decode info an array var source=((paramsSource).slice(1)).toUpperCase(); // dump "G" at start & capitalize var i=0,j=0; var base16='0123456789ABCDEF'; var buffer=new Array(); buffer=source.split('G'); // init (in case FL doesn't pass anything) params[0]=''; params[1]=''; params[2]=''; params[3]=''; params[4]=''; // parse for (i=0;i<buffer.length;i++) { params[i]=''; for (j=0;j<buffer[i].length;j+=2) { params[i]+=String.fromCharCode(16*base16.indexOf(buffer[i].charAt(j))+base16.indexOf(buffer[i].charAt(j+1))); } } } function user_dec() { // decodes the user data elements // init (in case FL doesn't pass anything) userData[0]='';userData[1]='';userData[2]='';userData[3]=''; // parse userData[0]=params[1].substring(0,params[1].indexOf(':')); userData[1]=params[1].substring(params[1].indexOf(':')+1,params[1].lastIndexOf(':')); userData[2]=params[1].substring(params[1].indexOf('[')+1,params[1].indexOf(']')); userData[3]=params[1].substring(params[1].indexOf('|')+1,params[1].lastIndexOf('|')).slice('|'); // DEBUG //userData[3]='[]'; // END DEBUG } function scanRegInfo() { // scans ID-s and pluglist and updates regInfo var i,j; // scan codes var codes=userData[3].split('|'); for (i=0;i<codes.length;i++) { for (j=0;j<regInfo.length;j++) { if (regInfo[j].code==Number(codes[i])) { regInfo[j].registered=true; } } } // scan pluglist var pluglist=params[4].split(':'); for (i=0;i<pluglist.length;i++) { for (j=0;j<regInfo.length;j++) { if (regInfo[j].name.toUpperCase()==pluglist[i].toUpperCase()) { regInfo[j].needed=true; } } } } // -------------------------------------- // -------------------------------------- // to pass parameters as an URL // -------------------------------------- function escape2(source) { var i,c; var result=''; for (i=0;i<source.length;i++) { c=source.charAt(i); switch (true) { case (c==' '): result+='+'; break; case ((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9') || c=='.' || c=='/' || c=='\\'): result+=c; break; default: result+='%'+(Number(source.charCodeAt(i)).toString(16)).toUpperCase(); } } return result; } // -------------------------------------- // -------------------------------------- // procedures for managing the expanding tables // -------------------------------------- function switchDTable(name) { // switches the body DIV of the table var tableBody=eval(name+'body'); var tableGadget=eval(name+'gadget'); if (tableBody.style.display=='none' || tableBody.style.display=='') { tableBody.style.display='block'; tableGadget.src='img_glob/_dyntbl_topleft2.gif'; } else { tableBody.style.display='none'; tableGadget.src='img_glob/_dyntbl_topleft1.gif'; } } var countDTable=1; // this variable is used to give tables unique names (next function) function makeDTable(title, contents, isOpened) { // renders a dynamic table // header document.write('<p><table class="table-header" onClick="switchDTable(\''); // >>> table header document.write('table'+(++countDTable)); // increase counter & write caller name document.write('\');" width="100%" border="0" cellspacing="0" cellpadding="0">'); document.write('<tr>'); document.write('<td width="22" height="22" align="left" background="img_glob/_dyntbl_top.gif">'); // >>> top left edge if (isOpened) document.write('<img src="img_glob/_dyntbl_topleft2.gif" name="'); else document.write('<img src="img_glob/_dyntbl_topleft1.gif" name="'); document.write('table'+countDTable+'gadget'); // write image name document.write('" width="22" height="22"></td>'); document.write('<td height="22" align="left" background="img_glob/_dyntbl_top.gif">'); // >>> top (title) document.write('<nobr><span class="table-title">'+title+'</span> <span class="table-titlenote">(click here for more information)</span></nobr></td>'); // write title document.write('<td width="22" height="22" align="right" background="img_glob/_dyntbl_top.gif"><img src="img_glob/_dyntbl_topright.gif" width="23" height="22"></td></tr></table>'); // >>> top right edge if (isOpened) document.write('<div class="table-body" style="display: block" id="table'+countDTable+'body">'+contents+'</div>'); // >>> write table body name (opened) & contents else document.write('<div class="table-body" style="display: none" id="table'+countDTable+'body">'+contents+'</div>'); // >>> write table body name (closed) & contents document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>'); // >>> bottom section document.write('<td width="22" height="22" align="left" background="img_glob/_dyntbl_bottom.gif"><img src="img_glob/_dyntbl_bottomleft.gif" width="23" height="22"></td>'); // >>> bottom left edge document.write('<td height="22" background="img_glob/_dyntbl_bottom.gif"> </td>'); // >>> bottom side document.write('<td width="22" height="22" align="right" background="img_glob/_dyntbl_bottom.gif"><img src="img_glob/_dyntbl_bottomright.gif" width="23" height="22"></td>'); // >>> bottom right edge document.write('</tr></table></p>'); } function makePlugDTable(i) { // makes a "plugin" dynamic table (based on the regInfo index) var contents=''; contents+='<table border="0" cellspacing="0" cellpadding="0"><tr>'; contents+='<td><img src="img_glob/Register '+regInfo[i].name+'.gif" width="130" height="130" align="left">'; contents+=productText[i]+'</td></tr></table>'; contents+='<br><br>Click '+returnBuyLink(regInfo[i].code)+'here</a> to order.'; if (regInfo[i].name=='SimSynth') { makeDTable('SimSynth Live',contents, false); } else { makeDTable(regInfo[i].name,contents, false); } } function makeFLDTable(i) { // makes a "FL info" dynamic table (based on the regInfo index) var titleEnd; // modifies the table title var contents='<table border="0" cellpadding="5" cellspacing="5">'; contents+='<tr valign="top">'; var cellSpan; // how many percent spans each table cell if (i==-1) cellSpan='33%'; if (i==2) cellSpan='50%'; if (i==1) cellSpan='100%'; if (i==0) { // if all upgrades are purchased, just write "no upgrades.." document.write('<p>No FL-Studio upgrades are available for your release.</p>'); } else { // write the tables.. if (i==-1) { titleEnd="purchases"; contents+='<td width="'+cellSpan+'" class="fl-tbl">'; contents+=productText[2]; if (i==-1) { contents+='<p>'+returnBuyLink(31000)+'Click here to buy Express Edition ($49).</a></p>'; } contents+='</td>'; } else { titleEnd="upgrades"; } if (i==2 || i==-1) { contents+='<td width="'+cellSpan+'" class="fl-tbl">'; contents+=productText[1]; if (i==-1) { contents+='<p>'+returnBuyLink(31010)+'Click here to buy FruityLoops Edition ($99).</a></p>'; } if (i==2) { contents+='<p>'+returnBuyLink(31050)+'Click here to upgrade to FruityLoops Edition ($59).</a></p>'; } contents+='</td>'; } if (i>=1 || i==-1) { contents+='<td width="'+cellSpan+'" class="fl-tbl">'; contents+=productText[0]; if (i==-1) { contents+='<p>'+returnBuyLink(31020)+'Click here to buy Producer Edition ($149).</a></p>'; } if (i==1) { contents+='<p>'+returnBuyLink(31040)+'Click here to upgrade to Producer Edition ($59).</a></p>'; } if (i==2) { contents+='<p>'+returnBuyLink(31051)+'Click here to upgrade to Producer Edition ($109).</p>'; } contents+='</td>'; } contents+='</tr></table>'; makeDTable('Available FL-Studio '+titleEnd,contents, true); } } // -------------------------------------- // -------------------------------------- // procedures for writing the links // -------------------------------------- function returnLink(action, productID) { // returns link for the product/action specified var linkContent=''; linkContent+='<a href="http://flredirect.e-officedirect.com/flredirect.exe?forumname=flstudio'; linkContent+='&action='+action; linkContent+='&username='+escape2(userData[0]); // linkContent+='&applicationID='+escape2(params[2])+'; appID not needed if (action=='buy') linkContent+='&P_code='+productID; // product code only in buy/upgrade links linkContent+='" target="_blank" class="link-common">'; return linkContent; } function returnSupportLink() { // support request link (reg problems) return returnLink('supportrequest',0); } function returnRegisterLink() { // code request/register link return returnLink('register',0); } function returnBuyLink(productID) { // product buy/upgrade return returnLink('buy',productID); } // --------------------------------------